#!/bin/bash

addr=`bitcoin-cli getnewaddress`
echo  "address => $addr"

pub=`bitcoin-cli validateaddress $addr | jq '.pubkey' | sed s/\"//g`
echo "public key => $pub"

prv=`bitcoin-cli dumpprivkey $addr`
echo "private key => $prv"